import Vue from 'vue';
import VueRouter from 'vue-router';
Vue.use(VueRouter);

import LoginPage from '@/views/LoginPage/LoginPage.vue'
// 引入layout主框架页面

import product from './module/product'
import user from './module/user'

let otherRouter = [user, product];

// 书写路由规则
const routes = [{
        path: '/',
        redirect: '/login'
    }, {
        path: '/login',
        component: LoginPage
    },
    ...otherRouter
];

// 创建路由的实例
const router = new VueRouter({
    // routes: routes
    routes

});
export default router;